package xyz.zhouzhousag.dao;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import xyz.zhouzhousag.domain.Account;

import java.util.List;

/**
 * Description:账户dao接口
 * <p>
 * ClassName: IAccountDAO
 * date: 2021/2/25 15:49
 *
 * @author Yin.Liu
 * @version 1.0
 * @since JDK 1.8
 */
@Repository
public interface IAccountDAO {

    /**
     * 查询所有账户
     * @return
     */
    @Select("select * from account")
    List<Account> findAll();

    /**
     * 保存账户信息
     * @param account
     */
    @Insert("insert into account (name,money) values (#{name},#{money})")
    void saveAccount(Account account);

}
